package com.telsoft.hms.util;

import com.telsoft.hms.lib.security.exception.SessionNotExistsException;
import com.telsoft.hms.lib.security.server.WsRuntime;
import com.telsoft.hms.lib.security.session.Session;

public class SessionUtil {
	/**
	 * @author NinhNV
	 * @param sercurityKey
	 * @param username
	 * @return Đối tượng sercurity
	 * @throws Exception
	 * Ngày tạo 15/09/2014
	 */
	public static Session getSession(String sercurityKey) throws Exception{
		try {
			return new WsRuntime().validateSecurity(sercurityKey);
		} catch (SessionNotExistsException e) {
			// TODO Auto-generated catch block
			throw new Exception("SK-0001");
		} 
	}
}
